package com.yunfangdata.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter@Setter
@ToString
public class Employee extends BaseDomain {

    public static final int NORM = 1;
    public static final int ZERO = 0;

    private Long id;

    private String username;

    private String realName;

    private String password;

    private String tel;

    private String email;
    //部门
    private Department dept;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private Date inputTime;

    private int state;

    private boolean admin;

    //头像
    private String portrait;

    //角色
    private List<Role> roles = new ArrayList<>();

}